package com.houpu.service;

import com.houpu.dao.SortMapper;
import com.houpu.pojo.Sort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/*
 * 业务层
 */
@Service
public class SortMapperService {
    @Resource
    @Autowired(required = false)
    private SortMapper sortMapper;

    public List<Sort> getSelectAll(Sort sort) {
        List<Sort> sorts = sortMapper.selectAll(sort);
        return sorts;
    }

    public int getInsert(Sort sort){
        return sortMapper.insert(sort);
    }

    public int getdelete_id(Sort sort){
        return sortMapper.delete_id(sort);
    }

    public List<Sort> getout_id(Sort sort){
        return sortMapper.out_id(sort);
    }

    public int get_update(Sort sort){
        return sortMapper.update_id(sort);
    }

    public List<Sort> getSP_id(){
        return sortMapper.selectProSortAll();
    }

    public List<Sort> get_classs(Sort sort){
        return sortMapper.classs(sort);
    }
}
